package com.atguigu.day16.math01;

import org.junit.Test;

import java.math.BigInteger;

/*
BigInteger: 过大的整数

 */
public class BigIntegerTest {

    @Test
    public void test02() {
        int m = 10;
        int n = 20;
        System.out.println(m + n);
        System.out.println(m - n);

        BigInteger b1 = new BigInteger("10");
        BigInteger b2 = new BigInteger("4");

       // System.out.println(b1+b2);
        BigInteger add = b1.add(b2);
        System.out.println("add = " + add);
        System.out.println("b1.subtract(b2) = " + b1.subtract(b2));
        System.out.println("b1.multiply(b2) = " + b1.multiply(b2));
        System.out.println("b1.divide(b2) = " + b1.divide(b2));
        System.out.println("b1.remainder(b2) = " + b1.remainder(b2));

    }

    @Test
    public void test01() {
        long maxValue = Long.MAX_VALUE;
        System.out.println("maxValue = " + maxValue);//922 3372 0368 5477 5807

        long money = 9223372036854775807L;

        BigInteger b1 = new BigInteger("92233720368547758071111");
        System.out.println("b1 = " + b1);
    }
}
